package architect.algorithn;

import java.util.HashSet;

/**
 * 评分实体类
 *
 * @author guanxin
 * @date 2018/5/8 14:40
 */

public class Rating {
    // 记录差值
    private float value;
    // 记录评分人数
    private int freq;
    // 记录打分用户ID
    public HashSet<Integer> userIds = new HashSet<>();
    // 平均值
    private float averageValue;

    public float getValue() {
        return value;
    }

    public void setValue(float value) {
        this.value = value;
    }

    public int getFreq() {
        return freq;
    }

    public void setFreq(int freq) {
        this.freq = freq;
    }

    public float getAverageValue() {
        return this.value / this.freq;
    }
}
